#include<stdio.h>
void reverse(int number)
{
	if(number<0)
	{
		number=-number;
	}
	if(number==0)
	{
		printf("0");
	}
	while(number!=0)
	{
		printf("%d",number%10);
		number=number/10;
	}
	

	printf("\n");
}
int main ()
{
	int a;
	while(scanf("%d",&a)!=EOF)
	{
		if(a<0)
		{
			printf("-");
		}
		reverse(a);
	}
	return 0;
}
